package com.aegean.MonitorExamSYS.android.action;

import java.io.File;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.aegean.MonitorExamSYS.android.business.AndroidBusiness;
import com.opensymphony.xwork2.ActionSupport;
@Controller("UpdatePhotoForAndroid")
@Scope("prototype")
public class UpdatePhotoForAndroid extends ActionSupport {
	@Resource
	AndroidBusiness business;
	private int user_Id;
	private boolean success;
	public boolean isSuccess() {
		return success;
	}
	public void setSuccess(boolean success) {
		this.success = success;
	}
	public int getUser_Id() {
		return user_Id;
	}
	public void setUser_Id(int user_Id) {
		this.user_Id = user_Id;
	}
	public File getPhoto() {
		return photo;
	}
	public void setPhoto(File photo) {
		this.photo = photo;
	}
	public String getPhotoFileName() {
		return photoFileName;
	}
	public void setPhotoFileName(String photoFileName) {
		this.photoFileName = photoFileName;
	}
	public String getPhotoContentType() {
		return photoContentType;
	}
	public void setPhotoContentType(String photoContentType) {
		this.photoContentType = photoContentType;
	}
	private File photo;
	private String photoFileName;
	private String photoContentType;
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		success=business.updatePhoto(user_Id, photo, photoFileName, photoContentType);
		return SUCCESS;
	}
}
